package org.htzb.news.entity;

import java.util.List;

public class Comment {
    private int cid;//评论id
    private int cnid;//新闻id
    private String ccontent;
    private List<Comment> comments;//评论内容
    private String cdate;//评论时间
    private String cip;//评论ip地址
    private String cauthor;//评论作者

    public Comment(int cnid, String ccontent, String cdate, String cip, String cauthor) {
        this.cnid = cnid;
        this.ccontent = ccontent;
        this.cdate = cdate;
        this.cip = cip;
        this.cauthor = cauthor;
    }

    public Comment() {

    }

    public List<Comment> getComments() {
        return comments;
    }

    public void setComments(List<Comment> comments) {
        this.comments = comments;
    }

    public int getCid() {
        return cid;
    }

    public void setCid(int cid) {
        this.cid = cid;
    }

    public int getCnid() {
        return cnid;
    }

    public void setCnid(int cnid) {
        this.cnid = cnid;
    }

    public String getCcontent() {
        return ccontent;
    }

    public void setCcontent(String ccontent) {
        this.ccontent = ccontent;
    }

    public String getCdate() {
        return cdate;
    }

    public void setCdate(String cdate) {
        this.cdate = cdate;
    }

    public String getCip() {
        return cip;
    }

    public void setCip(String cip) {
        this.cip = cip;
    }

    public String getCauthor() {
        return cauthor;
    }

    public void setCauthor(String cauthor) {
        this.cauthor = cauthor;
    }

    @Override
    public String toString() {
        return "Comment{" +
                "cid=" + cid +
                ", cnid=" + cnid +
                ", ccontent='" + ccontent + '\'' +
                ", comments=" + comments +
                ", cdate='" + cdate + '\'' +
                ", cip='" + cip + '\'' +
                ", cauthor='" + cauthor + '\'' +
                '}';
    }
}
